﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace ImageToolKit.Net
{
    public class ImageToolKitNative
    {
        const string DLLNAME = "ImageToolKit.DLL";

        [DllImport(DLLNAME, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
        public static extern bool ImageSpilte(string path, string fileName, string outputDir, int sizeInBytes);

        [DllImport(DLLNAME, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
        public static extern bool ImageResize(string path, string newFilePath, int newWidth);

        [DllImport(DLLNAME, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
        public static extern bool ImageInversion(string filePath, string newFilePath, WICBitmapTransformOptions inversionType);

        [DllImport(DLLNAME, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
        public static extern bool ImageGetSize(string path, ref uint width, ref uint height);
    }
}
